import math


def trans(x, len):
    s = ""
    while x or len:
        if not x:
            print("00", end='')
            s += "00"
        else:
            print("%02x" % (x & 0xff), end='')
            s += "%02x" % (x & 0xff)
        x >>= 8
        len -= 1
    print()
    return s


st = ""
while True:
    s = input("input your code >> ")
    if s == "end":
        break
    if len(s) > 4:
        n = 4
    else:
        n = 2
    x = eval("0x" + s)
    st += trans(x, n)
print(st)

